1. Field of the Invention
The present general inventive concept relates to an image forming apparatus and a method of distinguishing an XML (extensible markup language) Paper Specification (XPS) file. More specifically, the present general inventive concept relates to an image forming apparatus to improve a recognition speed of an XPS file and a method of distinguishing the XPS file.
2. Description of the Related Art
In general, an image forming apparatus is a device which prints printing data generated at a terminal, such as computer, onto a recording medium. Examples of the image forming apparatus include a copier, a printer, a fax machine, and a Multi Function Peripheral (MFP) integrating functions of the copier, the printer, and the fax machine in a single apparatus.
Image forming apparatuses recently provided support not only printing data written in a conventional Page Description Language (PDL) such as PostScript (PS) and Printer Command Language (PCL) but also a printing function of an XPS file with an XPS emulator.
The XPS file is a fixed-layout electronic file which can preserve a document format and share the file. The XPS file systemizes every resource required for the corresponding document or job in a directory structure and then compresses every data and resource written in the XML with the reference between them in a ZIP format. The XPS file has a logical tree structure including a plurality of layers as illustrated in FIG. 2.
The XPS file of FIG. 2 is in the hierarchical structure such as job levels, document levels, and page levels. Each document level and page level can include a plurality of documents and pages. Different printing options can be set per document and per page.
To examine whether the received printing data is the XPS file, a conventional image forming apparatus distinguishes the XPS file by checking whether the XPS file includes a particular attribute value.
However, since the XPS file is the compressed file as stated above, it is essential to decompress the XPS file to examine the attributes in the XPS file. In this regard, it takes a considerable time to recognize the XPS file. In particular, when a file including the particular attribute value is at the end of the XPS file, it takes an even longer time to determine whether the received printing data is the XPS file.